home *** CD-ROM | disk | FTP | other *** search
/ Amiga Collections: Bavarian / Bavarian #033 (19xx)(APS Electronic).zip / Bavarian #033 (19xx)(APS Electronic).adf / ClearHighScore.c < prev    next >
C/C++ Source or Header  |  2004-11-28  |  488b  |  28 lines

  1. #include <libraries/dosextens.h>
  2.  
  3. struct HighScore
  4. {
  5.  short punkte;
  6.  char name[30];
  7. };
  8. struct HighScore highscore[10];
  9. char dname[]="ABCDEFGHIJKLMNOPQRSTUVWXYZ";
  10. short dscore=500;
  11. struct FileHandle *fh,*Open();
  12.  
  13. main()
  14. {
  15.  long loop;
  16.  
  17.  for (loop=0l;loop<10l;loop++)
  18.  {
  19.   highscore[loop].punkte=dscore;
  20.   dscore-=50;
  21.   strcpy (highscore[loop].name,dname);
  22.  }
  23.  if (!(fh=Open ("Paranoid:highscore",1006l)))
  24.  { printf ("Schreibfehler\n"); exit(); }
  25.  Write (fh,highscore,320l);
  26.  Close (fh);
  27. }
  28.